﻿using System.Windows.Input;
using Red.Core;

namespace Red.Controls
{
    /// <summary>
    /// Here goes all global routed UI commands for Red.Controls library.
    /// </summary>
    public static class UICommands
    {
        public static RedCommand ResetLayout = new RedCommand();
        public static RedCommand SaveLayout = new RedCommand();
        public static RedCommand LoadLayout = new RedCommand();
        public static RedCommand ShowConsole = new RedCommand();
        public static RedCommand RefreshView = new RedCommand();
        public static RedCommand RestoreEngine = new RedCommand();
        public static RedCommand ShowEngineMonitor = new RedCommand();
        public static RedCommand ShowEngineDebugger = new RedCommand();
        public static RedCommand ShowEngineLogs = new RedCommand();
        public static RedCommand ShowInAssetBrowser = new RedCommand();
        public static RedCommand ShowConfigEditor = new RedCommand();

        public static RedCommand EditUndo = new RedCommand( "Undo Action", "appbar_undo" );
        public static RedCommand EditRedo = new RedCommand( "Redo Action", "appbar_redo" );

        public static RedCommand SaveResource = new RedCommand( "Save resource", "appbar_save" );
        public static RedCommand CreateResource = new RedCommand( "Create new resource", "appbar_new" );
        public static RedCommand ImportResource = new RedCommand( "Import resource", "appbar_resource" );
        public static RedCommand ShowHelp = new RedCommand( "Show Help", "appbar_question" );
        public static RedCommand CreateFolder = new RedCommand( "Create folder", "appbar_folder" );
        public static RedCommand OpenInNewTab = new RedCommand( "Open in new tab", "appbar_page_multiple" );
        public static RedCommand CloseTab = new RedCommand( "Close tab", "appbar_close" );

        static UICommands()
        {
            EditUndo.InputGestures.Add( new KeyGesture( Key.Z, ModifierKeys.Control ) );
            EditRedo.InputGestures.Add( new KeyGesture( Key.Y, ModifierKeys.Control ) );
            ApplicationCommands.Delete.InputGestures.Add( new KeyGesture( Key.Delete ) );
            ShowHelp.InputGestures.Add( new KeyGesture( Key.F1 ) );
        }
    }
}
